package com.gipson.amc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gipson.amc.entity.PageByDataTable;
import com.gipson.amc.entity.User;
import com.gipson.amc.model.request.UserRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户 Mapper 接口
 * </p>
 *
 * @author xsyuan
 * @since 2020-03-27
 */
public interface UserMapper extends BaseMapper<User> {
	
	Page<User> queryPageData(Page<User> page, @Param("user") User user, @Param("pageByDataTable") PageByDataTable pageByDataTable);
	
	User findUserByUserId(String id);
	
	/**
	 * 根据user获取user列表。
	 * @param
	 * @return
	 * @author cjw 2020-05-20
	 */
	List<User> findUserByUser(@Param("user") User user);
	
	/**
	 * 分页获取user信息。
	 *
	 * @param
	 * @return
	 * @author cjw 2020-05-20
	 */
	Page<User> findByPage(Page<User> page, @Param("params") UserRequest userRequest);
	
}
